package mapstruct;

import mapstruct.convert.ManConvert;
import mapstruct.dto.BoyRes;
import mapstruct.dto.GirlRes;
import mapstruct.po.BoyPo;
import mapstruct.po.GirlPo;

/**
 * The class/interface
 *
 * @author guodd
 * @version 1.0 use jdk 1.8
 */
public class MainUse {
    public static void main(String[] args) {
        BoyRes boyRes = ManConvert.MEN_CONVERT.po2Res(BoyPo.builder().name("张三").build());
        System.out.println(boyRes);
        GirlRes girlRes = ManConvert.MEN_CONVERT.po2Res(GirlPo.builder().name("张三").sex(1).build());
        System.out.println(girlRes);
        BoyPo boyPo = ManConvert.MEN_CONVERT.toF(BoyRes.builder().build());
        System.out.println(boyPo);
    }
}
